package homework1.test04;

public class Cat {
    // 私有属性
    private String color;
    private String breed;

    // 空参构造方法
    public Cat() {}

    // 有参构造方法
    public Cat(String color, String breed) {
        this.color = color;
        this.breed = breed;
    }

    // setter和getter方法
    public String getColor() {
        return color;
    }

    public void setColor(String color) {
        this.color = color;
    }

    public String getBreed() {
        return breed;
    }

    public void setBreed(String breed) {
        this.breed = breed;
    }

    // 吃饭行为
    public void eat() {
        System.out.println(color + "的" + breed + "正在吃鱼......");
    }

    // 抓老鼠行为
    public void catchMouse() {
        System.out.println(color + "的" + breed + "正在逮老鼠......");
    }
}
